<template>
    <div class="check-details">
        <div class="user-mess">
        	<div class="cell-img"><div class="user"><img src="./../../../assets/images/user2.png" /></div></div>
            <div class="cell-text">
               <div class="user-name">
                   <div class="name">全自动量子点荧光免疫分析仪QD-S1200</div>
                   <div class="btnns">
                       <el-button type="primary">编辑</el-button>
                       <el-button>上一个</el-button>
                       <el-button>下一个</el-button>
                   </div>
               </div>
               <div class="other-texts">
                   <div class="list gray">质控编码：jy-0001</div>
                   <div class="list gray">仪器编码：100202108010078</div>
                   <div class="list gray">负责人：4898902</div>
                   <div class="list gray">检验项目：4898902</div>
               </div><!--other-texts 信息列表-可单独使用--->
               <div class="other-texts column-4 margin-top-15">
                   <div class="list"><span class="gray">质控品编号：</span>66岁</div>
                   <div class="list"><span class="gray">质控品批号：</span>女</div>
                   <div class="list"><span class="gray">质控品名称：</span>普通外科</div>
                   <div class="list"><span class="gray">试剂名称：</span>张慧玉</div>
                   <div class="list"><span class="gray">试剂编号：</span><span class="blue-primary">全自动量子点荧仪</span></div>
                   <div class="list"><span class="gray">试剂批号：</span>yq-0001</div>
                   <div class="list"><span class="gray">统计时间：</span>刘备</div>
                   <div class="list"><span class="gray">检验者：</span>肾功能检测</div>
                   <div class="list"><span class="gray">质控品靶值±SD：</span>水平1：</div>
                   <div class="list"><span class="gray"></span>水平2：</div>
                   <div class="list"><span class="gray"></span>水平3：</div>
               </div><!--other-texts 信息列表-可单独使用--->
            </div>
        </div><!------user-mess 用户信息------>
        <div class="gray-card">
          <div style="padding-left: 10px;float: left;vertical-align:middle;width: 100%">
              <el-tabs v-model="activeTab">
                <el-tab-pane label="质控图" name="qualityGraphs" >
                  <qualityGraphs :user="user"   />
                </el-tab-pane>
                <el-tab-pane label="数据表格" name="dataTable">
                  <dataTable :user="user" />
                </el-tab-pane>
              </el-tabs>

            </div>
           <div style="float: left">
             <el-button type="primary" style="border-radius: 0px">下载质控报告</el-button>
             <el-button style="border-radius: 0px;">刷新</el-button></div>
        </div><!------gray-card 灰色卡片-可以单独使用------>
    </div>
</template>

<script>
import qualityGraphs from './qualityGraphs'
import dataTable from './dataTable'

export default {
  name: "qualityDetail",
  components: {  qualityGraphs, dataTable},
  data() {
    return {
      deviceList: [],
      activeTab: "qualityGraphs",
      loading: false,
      redirect: undefined,
      registerShow:false,
      checkList:[],
      qualityData:[],
      form: {
          dNo: '',
          dname: '',
          dpno: '',
          pro: '',
          sample: '',
          dep: [],
          mainMan: '',
          manager: '',
          date: '',
          factory: '',
          desc: '',
          func: '',
          dimg: '',
          dapp: '',
        }
    };
  },
  watch: {

  },
  created() {
      this.getDeviceList()
      this.getCheckList()
      this.getQualityData()
  },
  methods: {
      getQualityData(){
          let data ={
              date: '2021/8/1',
              low:'24.25',
              middle:'25.09',
              high:'25.09'
          }
          for(let i=0;i<31;i++){
            this.qualityData.push(data)
        }
      },
    toBack(){
        this.$emit('func',false)
    },
    getCheckList(){
        let check ={
            checkNo:'JY-0001',
            name:'孙悟空',
            checkName:'血红蛋白',
            checkTime:'2021/02/01 12:00',
            checkResult:'正常',
            isReport:'待生成'
        }
        for(let i=0;i<5;i++){
            this.checkList.push(check)
        }
    },
    getDeviceList(){
        let deviceExp ={
            name:'全自动量子点荧光免疫分析仪QD-S1200',
            deviceNo:'NJYKD-JY-XT-000006',
            dep:'心脑血管科',
            connet:true,
            warning:false,
            lock:false,
            wait2Check:true
        }
        for(let i=0;i<25;i++){
            this.deviceList.push(deviceExp)
        }
    },
    toDeviceInfo(id){
        this.$router.push({path:"/device/deviceInfo/index"});
    }
  }
};
</script>
